package com.docker.sys.role.roleMenu;

import com.docker.core.constant.APPIDConstant;
import com.docker.core.mvc.APPID;
import com.docker.core.mvc.Remark;
import com.docker.core.mvc.controller.BaseAPIController;
import com.jfinal.aop.Inject;

/**
 * @Author ldl
 * @Create 2020/09/23 023 11:25
 */
@Remark("系统角色菜单")
@APPID(APPIDConstant.dum_web)
public class RoleMenuController extends BaseAPIController {

    @Inject
    private RoleMenuService roleMenuService;

    /**
     * @Param: []
     * @return: TODO
     * @Author: ldl
     * @Create: 2020/11/30 030 16:11
     */
    @Remark("角色菜单树")
    public void tree() {
        renderAPISuccess(roleMenuService.tree(getPara("role_id"), getPara("app_id")));
    }

    /**
     * @Param: []
     * @return: TODO
     * @Author: ldl
     * @Create: 2020/12/11 011 16:54
     */
    @Remark("已分配列表")
    public void now() {
        renderAPISuccess(roleMenuService.now(getPara("role_id"), getPara("app_id")));
    }

    /**
     * @Param: []
     * @return: TODO
     * @Author: ldl
     * @Create: 2020/11/30 030 16:56
     */
    @Remark("添加角色菜单")
    public void save() {
        renderAPI(roleMenuService.save(getPara("role_id"), getPara("menu_ids")));
    }


}
